{% extends "cm_s/base.html" %}
{% load blurb %}

{% block title %}{{ block.super }} | {{ page.title }}{% endblock %}

{% block article %}
    {% ifnotequal nav_page "cm_s_main" %}
	   <h6><a href="{% url cm_s_main %}">Home</a> &raquo;</h6>
	{% endifnotequal %}
    <h1>{{ page.title }}</h1>
    {{ page.body|safe }}
    {% ifequal nav_page "cm_s_main" %}
		{% if projects %}
		   <h1>Featured Projects</h1>
		   {% for project in projects %}
			   <div class="unit size1of3{% if forloop.last %} lastUnit{% endif %}" id="project-{{ project.slug }}">
		           {% if project.med_image %}
		              <p><a href="{{ project.get_absolute_url }}"><img src="{{ project.med_image.url }}"></a></p>
		           {% endif %}
		           {{ project.short_summary|safe }}
				   <p><a href="{{ project.get_absolute_url }}">more...</a></p>
		       </div>
		   {% endfor %}
		{% else %}
		   <p>No projects defined. <a href="/admin/">Go create some</a>.</p>
		{% endif %}
	{% endifequal %}
	
    {% if page.call_to_action %}{% include "includes/call_to_action.html" %}{% endif %}
{% endblock %}